<template>
  <el-row>
    <el-tag type="success" class="mt-10">活动通道</el-tag>
    <ul class="fz12" style="line-height: 2;">
      <li><span>经营地址：</span>{{ date.areaname }}</li>
      <li><span>详细地址：</span>{{ date.address }}</li>
      <li><span>经营类别：</span>{{ date.industry}}</li>
      <li><span>蓝海行动：</span>{{ date.is_blue ? '已参加': '未参加' }}</li>
      <li><span>选择渠道：</span>{{ date.balance_type }}</li>
      <li><span>微信通道签约费率：</span>{{ date.wx_rate }} %</li>
      <li><span>支付宝通道签约费率：</span>{{ date.ali_rate }} %</li>
    </ul>
  </el-row>
</template>

<script>
import { merchantChannelWsActivityAudit } from '@/api/shop'

export default {
  data() {
    return {
      date: {
        areaname: '',
        address: '',
        industry: '',
        is_blue: '',
        balance_type: '',
        wx_rate: '',
        ali_rate: '',
        channel_status: null
      }
    }
  },
  methods: {
    handleDcumentInit() {
      merchantChannelWsActivityAudit(this.$route.query.id).then(res => {
        if (res.data.errorCode === 0) {
          this.$emit('updateState', ['activi', true])
          this.date.areaname = res.data.result.area.name.toString()
          this.date.address = res.data.result.address
          this.date.industry = res.data.result.industry.name
          this.date.is_blue = res.data.result.is_blue
          this.date.balance_type = res.data.result.balance_type
          this.date.wx_rate = res.data.result.wx_rate
          this.date.ali_rate = res.data.result.ali_rate
        }
      })
    }
  },
  created() {
    this.handleDcumentInit()
  }
}
</script>
